<div class="row">
<div class="button-container mb10">
	<?php echo Yii::app()->user->checkAccess('member|create')?CHtml::link('添加管理员',$this->createUrl('member/create'),array('class'=>'button')):'';?>
</div>
<table class="table table-bordered table-striped">
	<thead>
		<tr>
			<th style="width: 80px;"><input type="checkbox" class="btn_all" /> 编号</th>
			<th>账号</th>
			<th>邮件</th>
			<th>是否激活</th>
			<th>最后登录时间</th>
			<th style="width:200px;">管理操作</th>
		</tr>
	</thead>
	<?php 
	$isactive = Yii::app()->dict->get('member','isactive');
	foreach ($model as $v){?>
	<tr>
		<td><input type="checkbox" class="ids" name="ids[]" value="<?php echo $v->uid;?>" /> <?php echo $v->uid;?></td>
		<td><?php echo $v->username;?></td>
		<td><?php echo $v->email;?></td>
		<td><?php echo $isactive[$v->isactive];?></td>
		<td><?php echo empty($v->last_login_time)?'从未登录':Yii::app()->admincommon->formattime('Y-m-d',$v->last_login_time);?></td>
		<td>
			<?php echo Yii::app()->user->checkAccess('member|update')?CHtml::link('编辑',$this->createUrl('member/update',array('id'=>$v->uid))):'';?>
			<?php echo Yii::app()->user->checkAccess('member|editpass')?CHtml::link('修改密码',$this->createUrl('member/editpass',array('id'=>$v->uid))):'';?>
			<?php echo $v->uid!=1 && Yii::app()->user->checkAccess('member|delete')?CHtml::link('删除','javascript:void(0);',array('class'=>'delete','url'=>$this->createUrl('member/delete',array('id'=>$v->uid)))):'';?>
		</td>
	</tr>
	<?php }?>
</table>
<div class="table-bottom-operate">
    <div class="inline pull-left table-operate">
        <?php echo Yii::app()->user->checkAccess('member|deleteall')?CHtml::link('批量删除','javascript:void(0);',array('class'=>'button button-primary deleteall','url'=>$this->createUrl('member/deleteall'))):'';?>
    </div>
    <div class="inline pull-right page">
        <?php $this->widget('LinkPager',array('pages' => $pages)); ?>
    </div>
</div>
</div>